<?php if(!IS_AJAX){?>

<include file="Public:header" />
<div class="row">
  <div class="col-sm-7 col-md-8 col-lg-9">
    <section class="panel">
      <div class="panel-body dd" style="padding:5px 10px;" id="nestable_list_3"><?php }?>
        
        
        
        
        <?php if(!IS_AJAX){?>
      </div>
      
      <div class="pages" id="nestable_list_3pages"></div>
      
      
    </section>
  </div>
  <div class="col-sm-5 col-md-4 col-lg-3">
    <div class="states-info">
      <div class="panel green-bg">
        <div class="panel-body">
          <div class="row">
            <div class="col-xs-3"> <i class="fa fa-hand-o-right"></i> </div>
            <div class="col-xs-7">
              <h4>添加节点</h4>
              <span class="state-title"> <a class="text-success" href="##" onClick="_openWindow('<?php echo U('add');?>', 800, '添加节点', '保存', function(){ $('#nestable_list_3form').submit();}, '');">点击这里添加节点</a> </span> </div>
            <div class="col-xs-2"> <span class="fa fa-angle-right"></span> </div>
          </div>
        </div>
      </div>
    </div>
    <div class="panel">
      <header class="panel-heading"> 搜索 </header>
      <div class="panel-body">
        <form id="nestable_list_3form" action="<?php echo U('indextree');?>">
          <div class="input-group m-bot15">
            <input type="text" placeholder="搜索名称" name="keywords" class="form-control">
            <span class="input-group-btn">
            <button type="button" onClick="$('#nestable_list_3form').trigger('submit');" class="btn btn-default"><i class="fa fa-search"></i></button>
            </span> </div>
        </form>
        <div id="FlatTree" class="tree tree-plus-minus">
          <div class = "tree-folder" style="display:none;">
            <div class="tree-folder-header"> <i class="fa fa-folder"></i>
              <div class="tree-folder-name"></div>
            </div>
            <div class="tree-folder-content"></div>
            <div class="tree-loader" style="display:none"></div>
          </div>
          <div class="tree-item" style="display:none;"> <i class="tree-dot"></i>
            <div class="tree-item-name"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<include file="Public:footer" />
<link rel="stylesheet" type="text/css" href="/Public/Admin/AdminEX/js/nestable/jquery.nestable.css"/>
<script src="/Public/Admin/AdminEX/js/nestable/jquery.nestable.js"></script> 
<script>





$('#nestable_list_3').ajaxlist({success:function(){
	Nestable1();
}});






function  Nestable1() {

    var updateOutput = function (e) {
        var list = e.length ? e : $(e.target),
            output = list.data('output');
        if (window.JSON) {
			//alert(window.JSON.stringify(list.nestable('serialize')));
			$.post('<?php echo U('updatesort');?>',{data:window.JSON.stringify(list.nestable('serialize'))}, function(data){
				
			},'json');
           // output.val(window.JSON.stringify(list.nestable('serialize'))); //, null, 2));
        } else {
            output.val('JSON browser support required for this demo.');
        }
    };



    
    // activate Nestable for list 2
    $('#nestable_list_3').nestable()
        .on('change', updateOutput);
    // output initial serialised data
    //updateOutput($('#nestable_list_1').data('output', $('#nestable_list_1_output')));
    //updateOutput($('#nestable_list_2').data('output', $('#nestable_list_2_output')));




};
</script> 
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/ueditor.config.js"></script> 
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/ueditor.all.min.js"> </script> 
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/lang/zh-cn/zh-cn.js"></script>
</body></html><?php }?>